package com.github.common.util.pool;

import lombok.AllArgsConstructor;
import lombok.Getter;
import com.github.common.enums.common.CodedEnum;

@Getter
@AllArgsConstructor
public enum ThreadPoolEnum implements CodedEnum<Integer> {

    FIXED(0, "fixed"),

    CACHED(1, "cached"),

    SINGLE(2, "single"),

    SCHEDULED(3, "scheduled"),

    SINGLE_SCHEDULED(4, "single_scheduled"),

    WORK_STEALING(5, "work_stealing");

    private final Integer code;

    private final String desc;

    public static boolean isFixed(String type){
        return FIXED.getDesc().equals(type);
    }
}
